Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added "or" condition processing to validation parameters #53

Conversation

brewsoftware
Copy link
Contributor

Added a new format for handling "or" conditions. Specifically this would be written as

<ValidatedInput id="profile-companyMail" name="companyMail" type="email" placeholder="Email" validate="isEmpty|isEmail" errorHelp="Incorrect Email" />

The above would validate a non-required email field.

Added orConditions.
Added validation tests.
@brewsoftware
Copy link
Contributor Author

Note: This additionally has test reporting and working unit tests for the old and new behaviour.
Note: I've also updated the test harness reporter to include code coverage.
Note: Currently the conditions can either be all "and" or all "or" it does not support both.

TODO: Implement mixing of "or" and "and" condition logic. This would include something like...

(isEmpty|isEmail)&(isEmpty|isMobilePhone)
backward compatability would keep the ',' seperator so the above could also be written as
(isEmpty|isEmail),(isEmpty|isMobilePhone)
or
isEmpty|(isEmail|isMobilePhone)

@brewsoftware
Copy link
Contributor Author

Please see issue #25 for a description of the original issue.

@brewsoftware
Copy link
Contributor Author

This is covered by PR #54. A new single syntax to handle this and injecting parameters into the new Validator update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant